import React, { Component } from 'react'
import {withRouter} from 'react-router-dom';

class Header extends Component {
    forward = () =>{
        this.props.history.goForward()
    }
    render() {
        return (
            <div className="page-header">
                <h2>React Router Demo</h2>
                <button onClick={this.forward}>前进</button>
                <button>回退</button>
                <button>go</button>
            </div>
        )
    }
}
new Promise
export default withRouter(Header)
